def pow(x,n,m):
    if n == 1:
        return x%m
    k = pow(x, n//2, m)
    if n%2:
        return ((k*k)%m*x)%m
    else:
        return (k*k)%m

class Solution:
    def countGoodNumbers(self, n: int) -> int:
        if n == 1:
            return 5
        e = n//2
        m = int(1e9+7)
        c = pow(20, e, m)
        if n%2:
                c = (c*5)%m
        return c

class Solution:
    def countGoodNumbers(self, n: int) -> int:
        mod = 10**9 + 7
        # 循环快速幂
        def quickmul(x,N):
            ans = 1
            while N:
                if N & 1:
                    ans *= x % mod
                x *= x % mod
                N >>= 1
            return ans
        return quickmul(5, (n + 1) // 2) * quickmul(4, n // 2) % mod


if __name__ == '__main__':
    c = Solution()
    n = int(50)
    print(c.countGoodNumbers(n))